import 'WriteoffOrderPageByTeamIdResponseDto.dart';

/// 响应主体内容
class WriteoffOrderPageDataWriteoffOrderPageByTeamIdResponseDto {
  /// 当前页码
  final int? pageNum;

  /// 每页个数
  final int? pageSize;

  /// 总页数
  final int? pages;

  /// 所有个数
  final int? total;

  /// 当前页结果集
  final List<WriteoffOrderPageByTeamIdResponseDto>? list;

  /// 未处理订单数量
  final int? unProcessed;

  /// 核销通过订单数量
  final int? writeoffPass;

  /// 核销拒绝订单数量
  final int? writeoffRefuse;

  WriteoffOrderPageDataWriteoffOrderPageByTeamIdResponseDto({
    this.pageNum,
    this.pageSize,
    this.pages,
    this.total,
    this.list,
    this.unProcessed,
    this.writeoffPass,
    this.writeoffRefuse,
  });

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    if (pageNum != null) data['pageNum'] = pageNum;
    if (pageSize != null) data['pageSize'] = pageSize;
    if (pages != null) data['pages'] = pages;
    if (total != null) data['total'] = total;
    if (list != null) data['list'] = list!.map((e) => e.toJson()).toList();
    if (unProcessed != null) data['unProcessed'] = unProcessed;
    if (writeoffPass != null) data['writeoffPass'] = writeoffPass;
    if (writeoffRefuse != null) data['writeoffRefuse'] = writeoffRefuse;
    return data;
  }

  factory WriteoffOrderPageDataWriteoffOrderPageByTeamIdResponseDto.fromJson(
    Map<String, dynamic> json,
  ) {
    return WriteoffOrderPageDataWriteoffOrderPageByTeamIdResponseDto(
      pageNum: json['pageNum'],
      pageSize: json['pageSize'],
      pages: json['pages'],
      total: json['total'],
      list: json['list'] != null
          ? List<WriteoffOrderPageByTeamIdResponseDto>.from(
              json['list'].map(
                (x) => WriteoffOrderPageByTeamIdResponseDto.fromJson(x),
              ),
            )
          : [],
      unProcessed: json['unProcessed'],
      writeoffPass: json['writeoffPass'],
      writeoffRefuse: json['writeoffRefuse'],
    );
  }
}
